home *** CD-ROM | disk | FTP | other *** search
/ Amiga Collections: Camelot / Camelot 098 (1990-12)(Swedish User Group of Amiga)(SE)(PD)[WB].zip / Camelot 098 (1990-12)(Swedish User Group of Amiga)(SE)(PD)[WB].adf / XLisp-Stat / Examples / fstat.lsp < prev    next >
Lisp/Scheme  |  1990-10-11  |  295b  |  11 lines

  1. (defun f-statistic (m1 m2)
  2. "
  3. Args: (m1 m2)
  4. Computes the F statistic for testing model m1 within model m2."
  5.   (let ((ss1 (send m1 :sum-of-squares))
  6.         (df1 (send m1 :df))
  7.         (ss2 (send m2 :sum-of-squares))
  8.         (df2 (send m2 :df)))
  9.     (/ (/ (- ss1 ss2) (- df1 df2)) (/ ss2 df2))))
  10.  
  11.